Optimal. Leaf size=223 \[ \frac {2 \left (7 b^2 B+9 a (2 A b+a B)\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (7 a^2 A+5 A b^2+10 a b B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 \left (7 a^2 A+5 A b^2+10 a b B\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 \left (7 b^2 B+9 a (2 A b+a B)\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b (9 A b+11 a B) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b B \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{9 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 223, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3069, 3102,
2827, 2715, 2720, 2719} \begin {gather*} \frac {2 \left (7 a^2 A+10 a b B+5 A b^2\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 \left (7 a^2 A+10 a b B+5 A b^2\right ) \sin (c+d x) \sqrt {\cos (c+d x)}}{21 d}+\frac {2 \left (9 a (a B+2 A b)+7 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (9 a (a B+2 A b)+7 b^2 B\right ) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{45 d}+\frac {2 b (11 a B+9 A b) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{63 d}+\frac {2 b B \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2715
Rule 2719
Rule 2720
Rule 2827
Rule 3069
Rule 3102
Rubi steps
\begin {align*} \int \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^2 (A+B \cos (c+d x)) \, dx &=\frac {2 b B \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{9 d}+\frac {2}{9} \int \cos ^{\frac {3}{2}}(c+d x) \left (\frac {1}{2} a (9 a A+5 b B)+\frac {1}{2} \left (7 b^2 B+9 a (2 A b+a B)\right ) \cos (c+d x)+\frac {1}{2} b (9 A b+11 a B) \cos ^2(c+d x)\right ) \, dx\\ &=\frac {2 b (9 A b+11 a B) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b B \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{9 d}+\frac {4}{63} \int \cos ^{\frac {3}{2}}(c+d x) \left (\frac {9}{4} \left (7 a^2 A+5 A b^2+10 a b B\right )+\frac {7}{4} \left (7 b^2 B+9 a (2 A b+a B)\right ) \cos (c+d x)\right ) \, dx\\ &=\frac {2 b (9 A b+11 a B) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b B \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{9 d}+\frac {1}{7} \left (7 a^2 A+5 A b^2+10 a b B\right ) \int \cos ^{\frac {3}{2}}(c+d x) \, dx+\frac {1}{9} \left (7 b^2 B+9 a (2 A b+a B)\right ) \int \cos ^{\frac {5}{2}}(c+d x) \, dx\\ &=\frac {2 \left (7 a^2 A+5 A b^2+10 a b B\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 \left (7 b^2 B+9 a (2 A b+a B)\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b (9 A b+11 a B) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b B \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{9 d}+\frac {1}{21} \left (7 a^2 A+5 A b^2+10 a b B\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx+\frac {1}{15} \left (7 b^2 B+9 a (2 A b+a B)\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=\frac {2 \left (7 b^2 B+9 a (2 A b+a B)\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (7 a^2 A+5 A b^2+10 a b B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 \left (7 a^2 A+5 A b^2+10 a b B\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 \left (7 b^2 B+9 a (2 A b+a B)\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b (9 A b+11 a B) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b B \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x)) \sin (c+d x)}{9 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.50, size = 167, normalized size = 0.75 \begin {gather*} \frac {84 \left (18 a A b+9 a^2 B+7 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+60 \left (7 a^2 A+5 A b^2+10 a b B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )+\sqrt {\cos (c+d x)} \left (7 \left (72 a A b+36 a^2 B+43 b^2 B\right ) \cos (c+d x)+5 \left (84 a^2 A+78 A b^2+156 a b B+18 b (A b+2 a B) \cos (2 (c+d x))+7 b^2 B \cos (3 (c+d x))\right )\right ) \sin (c+d x)}{630 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(609\) vs.
\(2(255)=510\).
time = 0.34, size = 610, normalized size = 2.74
method | result | size |
default | \(-\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-1120 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}+\left (720 A \,b^{2}+1440 B a b +2240 B \,b^{2}\right ) \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-1008 A a b -1080 A \,b^{2}-504 B \,a^{2}-2160 B a b -2072 B \,b^{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (420 a^{2} A +1008 A a b +840 A \,b^{2}+504 B \,a^{2}+1680 B a b +952 B \,b^{2}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-210 a^{2} A -252 A a b -240 A \,b^{2}-126 B \,a^{2}-480 B a b -168 B \,b^{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+105 a^{2} A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+75 A \,b^{2} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-378 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a b +150 B a b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-189 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a^{2}-147 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b^{2}\right )}{315 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(610\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.14, size = 271, normalized size = 1.22 \begin {gather*} \frac {2 \, {\left (35 \, B b^{2} \cos \left (d x + c\right )^{3} + 105 \, A a^{2} + 150 \, B a b + 75 \, A b^{2} + 45 \, {\left (2 \, B a b + A b^{2}\right )} \cos \left (d x + c\right )^{2} + 7 \, {\left (9 \, B a^{2} + 18 \, A a b + 7 \, B b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 15 \, \sqrt {2} {\left (7 i \, A a^{2} + 10 i \, B a b + 5 i \, A b^{2}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 15 \, \sqrt {2} {\left (-7 i \, A a^{2} - 10 i \, B a b - 5 i \, A b^{2}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 21 \, \sqrt {2} {\left (-9 i \, B a^{2} - 18 i \, A a b - 7 i \, B b^{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 21 \, \sqrt {2} {\left (9 i \, B a^{2} + 18 i \, A a b + 7 i \, B b^{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{315 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.35, size = 264, normalized size = 1.18 \begin {gather*} \frac {2\,A\,a^2\,\left (\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )+\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )\right )}{3\,d}-\frac {2\,B\,a^2\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,A\,b^2\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{9\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,B\,b^2\,{\cos \left (c+d\,x\right )}^{11/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {11}{4};\ \frac {15}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{11\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {4\,A\,a\,b\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {4\,B\,a\,b\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{9\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________